
// truffle-config.js
require('dotenv').config();
const HDWalletProvider = require('@truffle/hdwallet-provider');
const infuraKey = process.env.INFURA_KEY;
const privateKey = process.env.PRIVATE_KEY;

module.exports = {
  networks: {
    development: {
      host: "127.0.0.1",
      port: 7545,
      network_id: "*" // Match any network id
    },
    rinkeby: {
      provider: () => new HDWalletProvider(`u5WTGojxsiULSyMX/DljxB+YZdo63h3AR57m1USfEqpTbWNPPD2RuA`, `https://rinkeby.infura.io/v3/https://linea-sepolia.infura.io/v3/b31edf2109ac4718838b71ac69fefc2f`),
      network_id: 4,       // Rinkeby's id
      gas: 5500000,        // Gas sent with each transaction (default: ~6700000)
      confirmations: 2,    // # of confs to wait between deployments. (default: 0)
      timeoutBlocks: 200,  // # of blocks before a deployment times out  (minimum/default: 50)
      skipDryRun: true     // Skip dry run before migrations? (default: false for public nets )
    },
    mainnet: {
      provider: () => new HDWalletProvider(`u5WTGojxsiULSyMX/DljxB+YZdo63h3AR57m1USfEqpTbWNPPD2RuA`, `https://linea-mainnet.infura.io/v3/b31edf2109ac4718838b71ac69fefc2f`),
      network_id: 1,       // Mainnet's id
      gas: 5500000,        // Gas sent with each transaction (default: ~6700000)
      confirmations: 2,    // # of confs to wait between deployments. (default: 0)
      timeoutBlocks: 200,  // # of blocks before a deployment times out  (minimum/default: 50)
      skipDryRun: true     // Skip dry run before migrations? (default: false for public nets )
    }
  },
  compilers: {
    solc: {
      version: "0.8.21",
      settings: {
        optimizer: {
          enabled: true,
          runs: 200
        },
        evmVersion: "istanbul"
      }
    }
  },
  db: {
    enabled: false
  }
};